package config

import (
	"hook/pkg/log"

	"github.com/BurntSushi/toml"
)

var Cfg *Config

func Init(filePath string) {
	if _, err := toml.DecodeFile(filePath, &Cfg); err != nil {
		log.Fatalln(err.Error())
	}
	log.Println("config init success")
}

func IsDebug() bool {
	return Cfg.Debug
}
